#pragma once

#include "Singleton.h"
#include "IResource.h"

class Library : public Singleton<Library>
{
public:
	typedef std::map<HashedString, IResource::Map_t> ResourcesMap_t;
	typedef std::pair<HashedString, IResource::Map_t> ResourcesPair_t;
public:
	void AddResource( const HashedString& name, Pointer<IResource>& model );
	Pointer<IResource> getResource( const HashedString& type, const HashedString& name ) const;
	HashedString getResourceName( HashedString type, IResource* resourse ) const;
	unsigned int ResourceCount() const;
	ResourcesMap_t& getResources();
protected:
	ResourcesMap_t m_resources;
};